package encheres.presentation.ui;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;

import java.awt.Dimension;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JTabbedPane;
import java.awt.GridLayout;


public class UIEncheres extends JFrame {

	private JPanel jContentPane = null;
	private JTabbedPane jTabbedPane = null;
	private int idsession;

	/**
	 * This method initializes 
	 * 
	 */
	public UIEncheres(final int idSession) {
		super();
		this.idsession = idSession;
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 */
	private void initialize() {
        
        this.setTitle("Encheres");
        this.setContentPane(getJContentPane());
        this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        this.pack();
        
        this.setSize(new Dimension(831, 730));
        this.setVisible(true);
			
	}

	/**
	 * This method initializes jContentPane	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			GridLayout gridLayout = new GridLayout();
			gridLayout.setRows(1);
			jContentPane = new JPanel();
			jContentPane.setLayout(gridLayout);
			jContentPane.add(getJTabbedPane(), null);
		}
		return jContentPane;
	}

	/**
	 * This method initializes jTabbedPane	
	 * 	
	 * @return javax.swing.JTabbedPane	
	 */
	private JTabbedPane getJTabbedPane() {
		if (jTabbedPane == null) {
			jTabbedPane = new JTabbedPane(JTabbedPane.LEFT);
			jTabbedPane.addTab("Créer compte", new JPanelCreationCompte());
			jTabbedPane.addTab("Proposer produit", new JPanelProposerProduit(this.idsession));
			jTabbedPane.addTab("Lister produits", new JPanelListerProduits(this.idsession));
		}
		return jTabbedPane;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
